<template>
    <h1>test1</h1>
    <button @click="changeTest2">改变test2的内容</button>
</template>

<script>
export default {
    name: "Test1",
    methods: {
        changeTest2() {
            //document.querySelector('#aaa').innerHTML = "xxxx 来自test1的修改"
            // 相当于调用了vuex中定义的mutation中的方法
            this.$store.commit("changeTest2AAAValue",Date.now())
        }
    }
}
</script>

<style scoped>

</style>